﻿#region 命名空间

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Optimization;
using WinnerCMS.WebFactory.Bundles;

#endregion

namespace WinnerCMS.WebUI
{
    public class BundleConfig
    {
        public static void RegisterBundles(BundleCollection bundles)
        {
            new WebFactory.Bundles.Bundle().Builder(bundles);


            bundles.Add(new StyleBundle("~/Content/Bootstrap/css").Include(
                "~/Content/bootstrap.css"
                , "~/Content/bootstrap-theme.css"
                )
                .Include("~/Content/iCheck/flat/flat.css",new CssRewriteUrlTransform())
                .Include("~/Content/themes/bootstrap/easyui.css",new CssRewriteUrlTransform())
                .Include("~/Content/css/select2.css", new CssRewriteUrlTransform())
                .Include("~/Content/bootstrap-datepicker3.css", "~/Content/Admin.css")
                );

            //Scripts/jquery.easyui-{version}.min.js
            var scriptBundle = new ScriptBundle("~/Scripts/AdminBase");
            scriptBundle.Include(
                "~/Scripts/jquery-{version}.js" 
                ,"~/Scripts/knockout-{version}.js"
                , "~/Scripts/jquery.validate.js"
                , "~/Scripts/jquery.easyui-{version}.js"
                , "~/Scripts/locale/easyui-lang-zh_CN.js"
                , "~/Scripts/jquery.message.js"
                , "~/Scripts/bootstrap.js"
                , "~/Scripts/fileinput.js"
                , "~/Scripts/jquery.placeholder.js"
                , "~/Scripts/jquery.sortable.js"
                //, "~/Scripts/UI/ui/jquery.ui.core.js"
                //, "~/Scripts/UI/ui/jquery.ui.widget.js"
                //, "~/Scripts/UI/ui/jquery.ui.mouse.js"
                //, "~/Scripts/UI/ui/jquery.ui.sortable.js"
                //, "~/Scripts/UI/ui/jquery.ui.progressbar.js"
                //, "~/Scripts/UI/ui/jquery.ui.effect.js"
                //, "~/Scripts/UI/ui/jquery.ui.effect-drop.js"
                //, "~/Scripts/UI/ui/jquery.ui.datepicker.js"
                //, "~/Scripts/UI/ui/jquery.ui.datepicker-zh-CN.js"
                , "~/Scripts/select2.js"
                , "~/Scripts/Select2-locales/select2_locale_zh-CN.js"
                , "~/Scripts/jquery.icheck.min.js"
                , "~/Scripts/bootstrap-datepicker.js"
                , "~/Scripts/locales/bootstrap-datepicker.zh-CN.min.js"
                , "~/Scripts/Admin.js"
                );
            scriptBundle.Orderer = new ScriptsOrderer();
            scriptBundle.Builder = new CMSBundleBuilder();
            scriptBundle.Transforms.Clear();
            bundles.Add(scriptBundle);

            //    // 使用要用于开发和学习的 Modernizr 开发版本。然后，在准备好进行生产时，
            //    // 使用 http://modernizr.com 上的生成工具来仅选取所需的测试
            //    bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
            //                    "~/Scripts/modernizr-*"));

            //    ScriptManager.ScriptResourceMapping.AddDefinition(
            //        "respond",
            //        new ScriptResourceDefinition
            //        {
            //            Path = "~/Scripts/respond.min.js",
            //            DebugPath = "~/Scripts/respond.js",
            //        });
        }
    }
}